4
4
.
.
3
3
.
.
1
1
D
D
i
i
v
v
i
i
d
d
e
e
r
r
I
I
n
n
f
f
o
o
Divider is not Container View, instead it is used to organize children of the Container View.
Divider inserts line between Views (horizontal or vertical depending on the stack type).
Syntax
Divider()
E
E
x
x
a
a
m
m
p
p
l
l
e
e
Example
struct ContentView: View {
var body: some View {
VStack {
Text("First Line")
Divider()
Text("Second Line")
}
}
}
Horizontal Line in VStack Vertical Line in HStack